﻿<UserControl x:Class="FirstFloor.ModernUI.App.Content.ControlsStylesSampleForm"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             xmlns:app="clr-namespace:FirstFloor.ModernUI.App"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <ScrollViewer>
        <StackPanel MinWidth="200">


            <TextBlock Text="SAMPLE FORM" Style="{StaticResource Heading2}" Margin="0,0,0,8" />
            <mui:BBCodeBlock BBCode="A sample form demonstrating various controls with support for validation and focus visualization." Margin="0,0,0,16"/>

            <!-- actual form starts here -->
            <StackPanel x:Name="Form" Orientation="Vertical">

                <!-- create viewmodel -->
                <StackPanel.DataContext>
                    <app:SampleFormViewModel />
                </StackPanel.DataContext>

                <StackPanel.Resources>
                    <Style TargetType="StackPanel">
                        <Setter Property="Orientation" Value="Horizontal" />
                        <Setter Property="Margin" Value="0,0,0,4" />
                    </Style>
                    <Style TargetType="Label" BasedOn="{StaticResource {x:Type Label}}">
                        <Setter Property="Width" Value="100" />
                        <Setter Property="VerticalAlignment" Value="Center" />
                    </Style>
                    <Style TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
                        <Setter Property="Padding" Value="0,3" />
                    </Style>
                    <Style TargetType="RadioButton" BasedOn="{StaticResource {x:Type RadioButton}}">
                        <Setter Property="Padding" Value="0,3" />
                    </Style>
                </StackPanel.Resources>

                <StackPanel>
                    <Label Content="First name" Target="{Binding ElementName=TextFirstName}"/>
                    <TextBox x:Name="TextFirstName" Width="150" Text="{Binding FirstName, Mode=TwoWay, ValidatesOnDataErrors=True}" />
                </StackPanel>
                <StackPanel>
                    <Label Content="Last name" Target="{Binding ElementName=TextLastName}"/>
                    <TextBox x:Name="TextLastName" Width="150" Text="{Binding LastName, Mode=TwoWay, ValidatesOnDataErrors=True}"/>
                </StackPanel>
                <StackPanel>
                    <Label Content="Gender" Target="{Binding ElementName=RadioGendeMale}"/>
                    <RadioButton x:Name="RadioGendeMale" Content="Male" />
                    <RadioButton Content="Female" Margin="8,0,0,0" />
                </StackPanel>
                <StackPanel>
                    <Label Content="Birth date" Target="{Binding ElementName=DateBirth}" />
                    <DatePicker x:Name="DateBirth" />
                </StackPanel>
                <StackPanel>
                    <Label Content="Address" Target="{Binding ElementName=TextAddress}"/>
                    <TextBox x:Name="TextAddress" Width="150" />
                </StackPanel>
                <StackPanel>
                    <Label Content="City" Target="{Binding ElementName=TextCity}"/>
                    <TextBox x:Name="TextCity" Width="150" />
                </StackPanel>
                <StackPanel>
                    <Label Content="State" Target="{Binding ElementName=ComboState}"/>
                    <ComboBox x:Name="ComboState" Width="150">
                        <ComboBoxItem>Alabama</ComboBoxItem>
                        <ComboBoxItem>Alaska</ComboBoxItem>
                        <ComboBoxItem>Arizona</ComboBoxItem>
                        <ComboBoxItem>Arkansas</ComboBoxItem>
                        <ComboBoxItem>California</ComboBoxItem>
                        <ComboBoxItem>Colorado</ComboBoxItem>
                        <ComboBoxItem>Connecticut</ComboBoxItem>
                        <ComboBoxItem>Delaware</ComboBoxItem>
                        <ComboBoxItem>Florida</ComboBoxItem>
                        <ComboBoxItem>Georgia</ComboBoxItem>
                        <ComboBoxItem>Hawaii</ComboBoxItem>
                        <ComboBoxItem>Idaho</ComboBoxItem>
                        <ComboBoxItem>Illinois</ComboBoxItem>
                        <ComboBoxItem>Indiana</ComboBoxItem>
                        <ComboBoxItem>Iowa</ComboBoxItem>
                        <ComboBoxItem>Kansas</ComboBoxItem>
                        <ComboBoxItem>Kentucky</ComboBoxItem>
                        <ComboBoxItem>Louisiana</ComboBoxItem>
                        <ComboBoxItem>Maine</ComboBoxItem>
                        <ComboBoxItem>Maryland</ComboBoxItem>
                        <ComboBoxItem>Massachusetts</ComboBoxItem>
                        <ComboBoxItem>Michigan</ComboBoxItem>
                        <ComboBoxItem>Minnesota</ComboBoxItem>
                        <ComboBoxItem>Mississippi</ComboBoxItem>
                        <ComboBoxItem>Missouri</ComboBoxItem>
                        <ComboBoxItem>Montana</ComboBoxItem>
                        <ComboBoxItem>Nebraska</ComboBoxItem>
                        <ComboBoxItem>Nevada</ComboBoxItem>
                        <ComboBoxItem>New Hampshire</ComboBoxItem>
                        <ComboBoxItem>New Jersey</ComboBoxItem>
                        <ComboBoxItem>New Mexico</ComboBoxItem>
                        <ComboBoxItem>New York</ComboBoxItem>
                        <ComboBoxItem>North Carolina</ComboBoxItem>
                        <ComboBoxItem>North Dakota</ComboBoxItem>
                        <ComboBoxItem>Ohio</ComboBoxItem>
                        <ComboBoxItem>Oklahoma</ComboBoxItem>
                        <ComboBoxItem>Oregon</ComboBoxItem>
                        <ComboBoxItem>Pennsylvania</ComboBoxItem>
                        <ComboBoxItem>Rhode Island</ComboBoxItem>
                        <ComboBoxItem>South Carolina</ComboBoxItem>
                        <ComboBoxItem>South Dakota</ComboBoxItem>
                        <ComboBoxItem>Tennessee</ComboBoxItem>
                        <ComboBoxItem>Texas</ComboBoxItem>
                        <ComboBoxItem>Utah</ComboBoxItem>
                        <ComboBoxItem>Vermont</ComboBoxItem>
                        <ComboBoxItem>Virginia</ComboBoxItem>
                        <ComboBoxItem>Washington</ComboBoxItem>
                        <ComboBoxItem>West Virginia</ComboBoxItem>
                        <ComboBoxItem>Wisconsin</ComboBoxItem>
                        <ComboBoxItem>Wyoming</ComboBoxItem>
                    </ComboBox>
                </StackPanel>
                <StackPanel>
                    <Label Content="Zip code" Target="{Binding ElementName=TextZipCode}"/>
                    <TextBox x:Name="TextZipCode" Width="150" />
                </StackPanel>
                <StackPanel >
                    <Label />
                    <CheckBox Content="I agree to the terms of use" />
                </StackPanel>

                <Button Content="Submit" Margin="100,16,0,0" HorizontalAlignment="Left" />
            </StackPanel>
        </StackPanel>
    </ScrollViewer>
</UserControl>
